package com.lft.com.oilgas.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.lft.com.oilgas.entity.Admin;
import com.lft.com.oilgas.mapper.AdminMapper;
import com.lft.com.oilgas.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements IAdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin login(Admin admin) {
        LambdaQueryWrapper<Admin> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Admin::getName, admin.getName());
        queryWrapper.eq(Admin::getPassword, admin.getPassword());
        System.out.println(adminMapper.selectOne(queryWrapper));
        return adminMapper.selectOne(queryWrapper);
    }

}
